package com.xbongbong.saas.service.impl;

import com.xbongbong.paas.redis.PaasRedisHelper;
import com.xbongbong.paas.redis.RedisPrefixConstant;
import com.xbongbong.saas.service.ClueStageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author long
 * @version v1.0
 * @date 2020/11/9 15:15
 * @since v1.0
 */
@Service("clueStageService")
public class ClueStageServiceImpl implements ClueStageService {

    @Resource
    private PaasRedisHelper paasRedisHelper;

    @Override
    public void removeRedis(String corpid,Long formId){
        String redisKey = corpid + "_" + formId + "_" + 1;
        paasRedisHelper.removeValue(RedisPrefixConstant.CLUE_STAGE,redisKey);
        redisKey = corpid + "_" + formId + "_" + 0;
        paasRedisHelper.removeValue(RedisPrefixConstant.CLUE_STAGE,redisKey);
        redisKey = corpid + "_" + formId + "_" + null;
        paasRedisHelper.removeValue(RedisPrefixConstant.CLUE_STAGE,redisKey);
    }
}
